package cn.scw.common.runner;

import cn.scw.common.constant.Constants;
import cn.scw.common.separate.SeparateMethod;
import cn.scw.common.utils.pay.ConfigUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class StartUpRunner implements ApplicationRunner {

    @Value("${api.profile}")
    private String apiProfile;

    @Value("${separate.img}")
    private String imageUrl;

//    @Resource
//    private SeparateMethod separateMethod;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        Constants.UPLOAD_FILE = apiProfile;

        Constants.IMG_FILE = imageUrl;

        //初始化绑定APP_ID
//        separateMethod.bindAppId(ConfigUtil.APP_ID);
    }
}
